cmake_minimum_required(VERSION 3.18)

project(cmaktest C)

add_library(suba SHARED a.c)
add_library(subb SHARED b.c)
target_link_libraries(subb suba)

add_executable(main main.c)
target_link_libraries(main subb)

install(TARGETS suba subb EXPORT TestExport DESTINATION lib)
install(EXPORT TestExport DESTINATION share FILE TestExport.cmake COMPONENT dev)
